package com.futureCloudMOM.controller.core.web.basic;

import com.futureCloudMOM.common.core.page.TableDataInfo;
import com.futureCloudMOM.controller.core.controller.BaseApiController;
import com.futureCloudMOM.core.domain.BasicEmployee;
import com.futureCloudMOM.core.service.BasicEmployeeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 文件名 BasicEmployeeController
 *
 * @since 2023/6/6 13:37
 */
@Api(tags = "员工信息")
@RestController
@RequestMapping("basic/employee")
public class BasicEmployeeController extends BaseApiController<BasicEmployee, BasicEmployee, BasicEmployeeService> {

    public BasicEmployeeController(BasicEmployeeService service) {
        super(service);
    }


    @ApiOperation("查询所有人员--可根据名称和编码进行筛选--可分页")
    @PostMapping("/getEmployeeByNameAndCode")
    public TableDataInfo getEmployeeByNameAndCode(@RequestBody BasicEmployee basicEmployee){
        startPage();
        return getDataTable(service.getEmployeeByNameAndCode(basicEmployee));
    }

}
